-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHANGE(pmd): @W-16866602@: Update PMD to version 7.6.0 #1638
Conversation
Hello @stephen-carter-at-sf , Could you please suggest from where to download the complete library for sfsx-scanner since it has the PMD included. In my project we are using below structure to install sfdx-scanner plugin via commit. |
Hello Guys, i am using sfdx-scanner for my project and custom PMD rule set for the static code analysis. |
Also, i am attaching the ruleset file |
@abhidev1108 ... can you please create a proper issue over at https://github.com/forcedotcom/sfdx-scanner/issues/new/choose instead of posting comments on a PR. Also, note that PMD has changed quite a bit from version 6 to version 7 - so you may need to make changes to your ruleset file. So first read through https://docs.pmd-code.org/latest/pmd_userdocs_migrating_to_pmd7.html to see if you need to make any changes. If you still are having trouble, then please put the exact error message that you are seeing when filling out the form to create an issue. But note that most likely your issue is PMD specific and not Code Analyzer specific. So I'll also ask you to download PMD independently from code analyzer and attempt to use your ruleset with PMD directly if you are still having issues to verify whether or not the error appears independent of code analyzer. --- UPDATE ---
are indeed PMD specific errors showing that you need to update your ruleset file to be compatible with PMD 7. This is not an issue with Code Analyzer |
@abhidev1108 In fact... a quick google search of cc_categories and PMD shows that way back in PMD 6.55.0 the cc_categories (and many other rule properties) were deprecated: https://docs.pmd-code.org/pmd-doc-6.55.0/pmd_rules_apex_codestyle.html So you indeed need to update your ruleset to stop using these fields which are no longer supported. Lastly, it looks like your ruleset primarily just changes the priority of the rules and selects which rules you want to run. May I recommend you look into the new Code Analyzer v5 which is currently in Developer Preview since it allows you to have far more fine grain control over which rules you want to run and allows you to configure the severity, tags, etc of each of the rules... without ever having to deal with PMD ruleset files. See https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/version-5.html |
No description provided.